﻿<?php
//header("Content-type: text/html;charset=gbk");//输出编码,避免中文乱码
require_once (dirname(__FILE__) . "/../include/common.inc.php");
if(isset($_POST["aid"])){
     $mysql = "SELECT t1.litpic,t2.shopName FROM dede_archives t1 LEFT JOIN dede_addon4sks t2 ON t1.id = t2.aid WHERE t2.typeid='12' AND t2.aid='".$_POST["aid"]."'"; 
	 //echo $mysql;
	  $con = mysql_connect($cfg_dbhost,$cfg_dbuser,$cfg_dbpwd);
	  mysql_select_db($cfg_dbname, $con);
	  mysql_query("SET NAMES ".$cfg_db_language); 
	 $query = mysql_query($mysql); 
	 $n=mysql_num_rows($query);
	 while($row = mysql_fetch_array($query,MYSQL_ASSOC)) {
			 if(null != $row["litpic"] && !"" == $row["litpic"] ) {
				 echo  '<img src="../..'.$row["litpic"].'" width="300" height="225"/>';
			 } else {
				 echo  '<img src="../images/defaultpic.gif" width="300" height="225"/>';
			 }
			  return ;
	 }
	mysql_close($con);
    
}else{
    die();
}

?>

